﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HybridLab.Virtual.Interfaces
{
	/// <summary>
	/// Base class for a Host that implements IVirtualHost
	/// </summary>
	public abstract class HostBase : IVirtualHost
	{
		/// <summary>
		/// The name of the virtual host
		/// </summary>
		public string HostName { get; protected set; }

		/// <summary>
		/// The domain of the user credentials to connect to this host
		/// </summary>
		public string Domain   { get; protected set; }

		/// <summary>
		/// The username to connect to this host
		/// </summary>
		public string UserName { get; protected set; }

		/// <summary>
		/// The password to connect to this host
		/// </summary>
		public string Password { get; protected set; }

		/// <summary>
		/// The host type
		/// </summary>
		public virtual string HostType { get; protected set; }

		/// <summary>
		/// Connects to a virtual host
		/// </summary>
		/// <param name="hostName">Host to connect to</param>
		/// <param name="domain">Domain for credentials</param>
		/// <param name="userName">Username for connecting</param>
		/// <param name="password">Password for connecting</param>
		public virtual void Connect(string hostName, string domain, string userName, string password)
		{
			HostName = hostName;
			Domain = domain;
			UserName = userName;
			Password = password;
		}

		/// <summary>
		/// Returns all the virtual machines in this host
		/// </summary>
		/// <returns>A List of IVirtualMachine</returns>
		public virtual List<IVirtualMachine> GetVMs()
		{
			throw new NotImplementedException();
		}
	}
}
